const path = require("path");
const htmlWebpackPlugin = require("html-webpack-plugin");

module.exports = {
    mode:"development",
    entry :{
        index:path.resolve(__dirname,'./src/js/index.js')
    },
    output:{
        path:path.resolve(__dirname,'./dist'),
        filename: "./js/[name].js"
    },
    plugins:[
        new htmlWebpackPlugin({
            template:"./src/index.html"
        })
    ],
    devServer: {
        /* 项目构建后录井 */
        contentBase:'./',
        open:true,
        host:"localhost",
        port:9709
    }
};
